<template>
    <view class="info ph-20 mt-20">
        <view class="w-f pv-32 ph-32 b-24 background-white mt-20">
            <view class="fs-28 fw-600 text-color4">产品描述</view>
            <view class="w-f mt-20">
                <u-parse :content="detail.description"></u-parse>
            </view>
        </view>
        <view class="w-f pv-32 ph-32 b-24 background-white mt-20 f ai-c jc-s-b" @click="toBusiness">
            <view class="f ai-c">
                <image :src="shopData.picUrl" class="w-120 h-120 b-12"></image>
                <view class="ml-24 f fd-c f1 mr-32">
                    <view class="fs-32 fw-600 text-color4">{{ shopData.name }}</view>
                    <view class="f mt-8">
                        <image
                            :src="index >= Number(shopData.score) ? star : starSelect"
                            class="w-24 h-24 mr-8"
                            v-for="(item, index) in 5"
                            :key="index"
                        ></image>
                    </view>
                    <view class="mt-12 f f1">
                        <view class="fs-26 text-color3">店铺描述：</view>
                        <view class="f f1 text-ellipsis-1 fs-26 text-color2">{{ shopData.description }}</view>
                    </view>
                </view>
            </view>
            <u-icon name="arrow-right" color="#999999" size="15"></u-icon>
        </view>
    </view>
</template>
<script setup lang="ts">
import star from '@/static/index/star.png';
import starSelect from '@/static/index/star-select.png';
import { toRefs } from 'vue';
const props = defineProps({
    detail: {
        type: Object,
    },
    shopData: {
        type: Object,
    },
});
const { detail, shopData } = toRefs(props);
// const detail = ref<any>('');
// const shopData = ref<any>('');
// function getData(data: any) {
//     detail.value = data;
// }
// function getShop(data: any) {
//     shopData.value = data;
// }
// const content = ref('');
const toBusiness = () => {
    uni.navigateTo({
        url: `/pages_shop/business/index?id=${shopData.value.id}`,
    });
};
// defineExpose({ getData: getData, getShop: getShop });
</script>
<style lang="scss" scoped>
.info {
    .preferential {
        background: #fff5f5;
        line-height: 32rpx;
        display: inline-block;
    }
    .background-white {
        background: #fff;
    }
    .old-price {
        text-decoration: line-through;
    }
    .text-position {
        position: relative;
        top: 22rpx;
    }
    .text-psymbol {
        position: relative;
        top: 12rpx;
    }
}
</style>
